#pragma once
#include<iostream>
#include<sys/epoll.h>
#include<vector>
#include "channel.h"
#include<memory>

#define MAX_EVENTS 16

class Channel;

class Epoll
{
private:
    int epfd = epoll_create1(0);
    int sockfd;
    epoll_event events[MAX_EVENTS], ev;
public:
    Epoll(/* args */);
    ~Epoll();
    // int addFd(int fd, uint32_t mark);
    std::vector<std::unique_ptr<Channel>> poll();
    void updateChannel(Channel *channel);
};
